package tmhprediction.test;

import java.util.HashMap;

import tmhprediction.classification.TMHClassifier;
import tmhprediction.eval.SolTmhEvaluator;
import tmhprediction.eval.TMHResidueEvaluator;
import tmhprediction.main.TMHResultMap;

public class EvaluateTreshold_1svn {


    public static void main(String[] args) {
        if (args.length < 1) {
            help();
            System.exit(2);
        }
        String separator = "/";
        if (args.length == 2) {
            separator = "\\";
        }
        String set0 = args[0].concat(separator)
                .concat("features_manual_0.arff");
        String set1 = args[0].concat(separator)
                .concat("features_manual_1.arff");
        String set2 = args[0].concat(separator)
                .concat("features_manual_2.arff");
        // String outputPath = args[0];
        try {

            // System.out.print(set0);
            TMHClassifier classifier0 = new TMHClassifier(set0, set1, 0.1, 1.0);
           // TMHClassifier classifier0 = new TMHClassifier("/Users/meiera/pp1/0_model.svm", set1);
            TMHResultMap map0 = classifier0.createResultMap();
            TMHResultMap result0 = TMHResidueEvaluator.evaluateProteins(map0);

            /*TMHClassifier classifier1 = new TMHClassifier(set1, set2, 0.1, 1.0);
            HashMap<String, double[]> map1 = classifier1.createResultMap();
            HashMap<String, double[]> result1 = TMHResidueEvaluator.evaluateProteins(map1);

            TMHClassifier classifier2 = new TMHClassifier(set2, set0, 0.1, 1.0);
            HashMap<String, double[]> map2 = classifier2.createResultMap();
            HashMap<String, double[]> result2 = TMHResidueEvaluator.evaluateProteins(map2);*/
            
            SolTmhEvaluator.printStatistics(result0);
            
            
            
            
        } catch (Exception e) {
        }
        
        
    }

    
    
    private static void help() {
        System.err
                .println("Input: \n path to directory with features_manual_<x>.arff files \n -w \t if you have windows");
    }
}
/*
 * for (String key : result.keySet()) { double[] resultValues = result.get(key);
 * writer.append(key + ": " + resultValues[0] + "; " + resultValues[1] + "; " +
 * resultValues[2]); writer.newLine(); }
 */


